<?php
class Role extends AppModel{
	
	//var $useTable = false;
	
	var $validate = array(
		'role_name' => array(
			'rule' => 'notEmpty',
			'message' => 'Bitte füllen Sie dieses Feld aus' 
		),
		'description' => array(
			'rule' => 'notEmpty',
			'message' => 'Bitte füllen Sie dieses Feld aus' 
		)
	);
	
	var $hasAndBelongsToMany = array( 
		'Method' => array(
			'className' => 'Method',
			'joinTable' => 'role_has_methods',
			'foreignKey' => 'role_id',
			'associationForeignKey' => 'method_id',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '', 
			'limit'  => '', 
			'offset'  => '', 
			'finderQuery' => '',
			'deleteQuery' => '', 
			'insertQuery'  => ''  
		),
		'User' => array(
			'className' => 'User',
			'joinTable' => 'user_has_roles',
			'foreignKey' => 'role_id',
			'associationForeignKey' => 'user_id',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '', 
			'limit'  => '', 
			'offset'  => '', 
			'finderQuery' => '',
			'deleteQuery' => '', 
			'insertQuery'  => ''  
		)
	);
	
	var $belongsTo = array('State');
	
	
	
}
?>
